home *** CD-ROM | disk | FTP | other *** search
/ Info-Mac 4 / Info_Mac IV CD-ROM (Pacific HiTech Inc.)(August 1994).iso / Development / Source / Telnet 2.6.1d1 4⁄26⁄94 Folder / source / vs / rsdefs.h next >
Text File  |  1993-12-19  |  3KB  |  84 lines

  1. /*------------------------------------------------------------------------------*/
  2. /* RSDEFS.H                                                                        */
  3. /* This is the defines file for rsmac.c.  There are enough defines and structs    */
  4. /* to merit putting them into a separate file, so I have done so    -SMB        */
  5.  
  6.  
  7. /*-------------------------------------------------------------------------*/
  8. /* some defines for easy structure access */
  9. #define FHeight RSlocal[w].fheight
  10. #define    Fascent    RSlocal[w].fascent
  11. #define FWidth RSlocal[w].fwidth
  12. #define    FONT RSlocal[w].fnum
  13. #define FSIZE RSlocal[w].fsiz
  14. #define FRight RSlocal[w].width
  15. #define RMAXWINDOWWIDTH (width)*FWidth+16 - (CHO)
  16. #define RMAXWINDOWHEIGHT (lines)*FHeight+16
  17.  
  18. /* the different cursor types */
  19. #define BLOCKCURSOR                0    /* BYU 2.4.11 */
  20. #define UNDERSCORECURSOR        1    /* BYU 2.4.11 */
  21. #define VERTICALCURSOR            2    /* BYU 2.4.11 */
  22.  
  23. /*  Capable of shifting the text to the right some # of pixels        */
  24. #define CVO 0
  25. #define CHO -3
  26.  
  27. /*------------------------------------------------------------------------*/
  28. /* Now we have some externs, packed away neatly from the rest of the code */
  29. extern TelInfoRec *TelInfo;
  30. extern short scrn;                    /* shut up, Tim */
  31. extern char *tempspot;
  32. extern MenuHandle myMenus[];
  33.  
  34.  
  35. /*--------------------------------------------------------------------------*/
  36. /* Time to define the big RS structure.  RSdata holds the font and screen     */
  37. /* specific stuff.  Basically all the ugly stuff you wouldnt otherwise         */
  38. /* care to look at                                                            */
  39.  
  40. struct RSdata {
  41.     OSType        id;            // RSDA
  42.     Rect        textrect;    /* Where the text is in the window */
  43.     Rect        cursor;        /* Cursor rectangle */
  44.     WindowPtr    window;        /* Window pointer */
  45.     PaletteHandle    pal;    /* My Palette */
  46.     char        cursorstate,/* BYU 2.4.11 - 0 is invisible, 1 is visible */
  47.                 selected;    /* BYU 2.4.11 - text is selected */
  48.     Point        last,
  49.                 anchor;
  50.     short        topline,
  51.                 leftmarg;    /* leftmost visible column position */
  52.     short        rheight,    /* Real window dimensions */
  53.                             /* adjusted to not include CHO boundary - TK 12/88 */
  54.                 rwidth;
  55.     short        height,
  56.                 width;        /* Window Dimensions rounded to the nearest character */
  57.     char        color[4];    /* color scheme for this machine's sessions */
  58.     Boolean        flipped;    /* Set when we've reversed normal fg and bg colors */
  59.     RGBColor    RGBs[4];    /* RGB Colors for window */
  60.     ControlHandle
  61.         left,        /* The CH for the left margin */
  62.         scroll;        /* The CH for the scroll bar */
  63.     short
  64.         min,        /* Minimum vertical scrollbar value (number of lines in screen buffer and scrollback) */
  65.         max,        /* Maximum vertical scrollbar value */
  66.         current,    /* current vertical scrollbar value */
  67.         lmin,        /* Minimum horizontal scrollbar value (always 0) */
  68.         lmax,        /* Maximum horizontal scrollbar value (number of columns not visible) */
  69.         lcurrent;    /* current horizontal scrollbar value (leftmost visible column) */
  70.     short
  71.         fascent,    /* Font Ascent */
  72.         fnum,        /* Font ID */
  73.         fsiz,        /* Font Size */
  74.         fheight,    /* Font Height/character */
  75.         fwidth,        /* Font Width /character */
  76.         monospaced;    /* Font is monospaced */
  77.     Boolean
  78.         skip;        /* TRUE if we are skipping the output */
  79.  
  80.     };
  81.  
  82. typedef struct RSdata RSdata;
  83.  
  84.